package com.example.perpetualcalendar.ui;

import androidx.annotation.NonNull;

import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowInsetsController;
import android.view.WindowManager;


import com.example.perpetualcalendar.R;
import com.example.perpetualcalendar.base.BaseActivity;
import com.example.perpetualcalendar.viewModel.WelcomeViewModel;

import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;


/**
 * @author langhua
 */
public class WelcomeActivity extends BaseActivity<WelcomeViewModel> {

    private Context context;
    /**
     * 线程池
     */
    public final ScheduledExecutorService executorService = new ScheduledThreadPoolExecutor(1);

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        context = this;
        executorService.schedule(new Runnable() {
            @Override
            public void run() {
                MainActivity.startMainActivity(context);
                finish();
            }
        },1500, TimeUnit.MILLISECONDS);

    }

    @NonNull
    @Override
    protected Class<WelcomeViewModel> setViewModel() {
        return WelcomeViewModel.class;
    }

}